Date and time formatting

Top 

 

Date and time formatting

 

In the date or time formatting window, you can select an example format from the drop down list  by clicking the small arrow button on the right. Or you can type of any the specifiers below.

 

 

Format specifiers

 

The following date and time format specifiers are available:

 

Specifier        Displays

dDay as a number without leading zero (e.g. 1, 31).
ddDay as a number with a leading zero (e.g. 01, 31).
dddDay as an abbreviation (e.g. Sun, Mon).
ddddFull day name (e.g. Sunday, Monday).
mMonth as a number without leading zero (e.g. 1, 11).
mmMonth as a number with a leading zero (e.g. 01, 11).
mmmMonth as a abbreviation (e.g. Jan, Nov).
mmmmFull month name (e.g. January, November).
yyYear as two-digit number (e.g. 99, 05).
yyyyYear as four-digit number (e.g. 1999, 2005).
hHour without a leading zero (e.g. 4, 23).
hhHour with a leading zero (e.g. 04, 23).
nMinute without  leading zero (e.g. 8, 15).
nnMinute with a leading zero (e.g. 08, 15).
sSecond without a leading zero (e.g. 3, 45).
ssSecond with a leading zero (.e.g 03, 45).
zDisplays the millisecond without a leading zero (e.g. 6, 990).
zzzDisplays the millisecond with a leading zero (e.g. 006, 990).
am/pmUses the 12-hour clock for the preceding h or hh specified and displays 'am' for any hour before noon and 'pm' for any hour after noon.
wWeek number according to ISO (e.g. 7, 43).
wwWeek number according to ISO with leading zero (e.g. 07, 43).
iiYear of ISO week denoted by w in 2 digits (e.g. 99, 02).
iiiiYear of ISO week denoted by w in 4 digits (e.g.1999, 2002).
eNumber of day in ISO week (e.g. Monday=1, Sunday=7).
eeNumber of day in ISO week with leading zero (e.g. Monday=01, Sunday=07).
fNumber of day in year denoted by y (e.g. 1 January=1, 2 February=32).
fffNumber of day in year denoted by y with leading zeros in three digits  (e.g. 1 January=001, 2 February=032).
'text'Characters between single quotes are displayed as is.

 

 

Examples

 

On 1 March 2005 at 07:15:03 am

 

Date formatDisplayed
yyyy-mm-dd 2005-03-01
dddd d mmmm yyyy - h'h' mm'm' ss's'Tuesday 1 March 2005 - 7h 15m 03s